// 使用type对函数参数对象进行声明
type userType = { name: string; age: number };

// 添加用户，user参数有name有age两个属性
let addUser = (user: userType): void => {
  console.log("添加用户");
};

addUser({
  name: "张三",
  age: 18,
});

// 更新用户
let updateUser = (user: userType): void => {
  console.log("更新用户");
};

updateUser({
  name: "李四",
  age: 23,
});
